package day11;

import java.io.FileInputStream;
import java.io.IOException;

/**
 * @author joker
 * @date 2022/4/21 0021 - 14:49
 */
public class Test02 {
    public static void main(String[] args) throws IOException {
        FileInputStream fr = new FileInputStream("01.jpg");
        FileInputStream fr2 = new FileInputStream("02.jpg");
        byte[] bytes = new byte[100];
        byte[] bytes2 = new byte[1024];
        fr.read(bytes);
        fr2.read(bytes2);
//        System.out.println(new String(bytes).equals(new String(bytes2)));
//        String s = new String(bytes);
//        System.out.println(Integer.toHexString(Integer.parseInt(s)));
        for (int i = 0; i < bytes.length; i++) {
            bytes[i]= (byte) Integer.parseInt(Integer.toHexString(bytes[i]));
        }
        System.out.println(new String(bytes));
    }

}
